import {
    RecordQueryParam,
    RecordPageResult,
} from './types';
import request from '@/utils/request';
import {AxiosPromise} from 'axios';

/**
 * 获取实体分页列表
 *
 * @taskParam queryParams
 */
export function listRecordPages(queryParams: RecordQueryParam): AxiosPromise<RecordPageResult> {
    return request({
        url: '/manager/table/page',
        method: 'post',
        data: queryParams,
    });
}

/**
 * 获取实体分页列表
 *
 * @taskParam queryParams
 */
export function queryRecordCounts(entityTypeList: string[]): AxiosPromise<RecordPageResult> {
    return request({
        url: '/manager/table/count',
        method: 'post',
        data: {
            entityTypeList: entityTypeList,
        },
    });
}
